import { ILoadMapTypeAll } from '@/common';
import { getLevelZeroJson, getSelectDataCommon, getTenantID } from '@/utils';
import { AssetacquisitionManageAPI } from '../common/type';
/**
 * @param {Object} loadMdicMapList 数据字典
 * @param {Object} areaListData 地区字典
 * */
const ModalSearchColumns = (loadMdicMapList: Record<string, any>, areaListData: any[]): AssetacquisitionManageAPI.IHeaderSearchType => {
  /**作废类型数据字典*/
  const cancelTypeList = getSelectDataCommon(loadMdicMapList?.[`${getTenantID()}${ILoadMapTypeAll.MATERIAL_CANCEL}`], 'name', 'id');

  /**物料品牌数据字典*/
  const brandTypeList = getSelectDataCommon(loadMdicMapList?.[`${getTenantID()}${ILoadMapTypeAll.MATERIAL_BRAND}`], 'name', 'id');

  /**物料类型数据字典*/
  const materialTypeMapList = loadMdicMapList?.[`${getTenantID()}${ILoadMapTypeAll.MATERIAL_TYPE}`];
  const searchColumns: AssetacquisitionManageAPI.ISearchList = [
    {
      name: 'applyState',
      placeholder: '资产名称',
      label: '资产名称',
      componentType: 'Input',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
    },
    /**===============================高级搜素================================*/
    {
      name: 'applyState',
      placeholder: '审批状态',
      label: '审批状态',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'applyStartTime',
      placeholder: '申请开始时间',
      label: '申请开始时间',
      componentType: 'RangePicker',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'applyEndTime',
      placeholder: '申请结束时间',
      label: '申请结束时间',
      componentType: 'RangePicker',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: true,
    },
  ];

  return searchColumns;
};

export { ModalSearchColumns };
